package com.evl.constant;

public enum CarriageType {
	s1("1", "硬卧"), 
	s2("2", "硬卧"),
	s3("3", "硬卧"),
	s4("4", "软卧"),
	s5("5", "软卧");

    String code;
    String message;

    CarriageType(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueStrOf(String status) {
        if (status == null) {
            return "";
        } else {
            for (CarriageType s : CarriageType.values()) {
                if (s.getCode().equals(status)) {
                    return s.getMessage();
                }
            }
            return "";
        }
    }
}
